<?php

namespace App\Traits;

trait EnumTrait
{
    public static function values(): array
    {
        return array_map(function ($item) {
            return $item->value;
        }, self::cases());
    }

    public static function inValue($value): bool
    {
        return in_array($value, self::values());
    }
}